package com.arpa.oms.service;

import com.arpa.oms.domain.dto.OmsInboundDTO;
import com.arpa.oms.domain.entity.OmsAllocation;
import com.arpa.oms.domain.entity.OmsInbound;
import com.arpa.oms.domain.vo.OmsInboundVO;
import com.arpa.wms.domain.entity.Inbound;
import com.arpa.wms.domain.entity.InboundItem;
import com.arpa.wms.domain.entity.Putaway;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * OMS入库单
 * </p>
 *
 * @author LEO
 * @since 2020-10-22
 */
public interface IOmsInboundService extends IService<OmsInbound> {

    /**
     * 根据WMS入库单生成OMS入库单
     * @param inbound
     */
    void saveByWmsInbound(Inbound inbound);




    /**
     * 根据code更新实体
     * @param entity
     * @return
     */
    int updateByCode(OmsInbound entity);

    /**
     * 查询列表
     * @return
     */
    List<OmsInboundVO> queryList(OmsInboundDTO omsInboundDTO);

    /**
     * 查询合计,包含总数
     * @return
     */
    OmsInboundVO queryListSum(OmsInboundDTO omsInboundDTO);

    /**
     * @description
     * 获取出库单及出库单明细列表
     * @author xuyang
     * @date 2020/11/14 8:02
     * @param code:
     **/
    OmsInboundVO getVOByCode(String code);

    void saveByOmsAllocation(OmsAllocation omsAllocation,Putaway putaway);

    void saveByWmsInbound(Inbound inbound, List<InboundItem> inboundItemList);

    List<Map<String, Object>> inboundCount(String shipmentCode, List<String> warehouseCodes);
}
